Add dropdown option for VMWare Inventory Source collection - #773
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds a user-selectable VMware inventory plugin/collection choice in the UI and wires that choice through to inventory source_vars so the backend can generate the correct plugin file name and plugin FQCN. It also updates the Ascender inventory plugin FQCN from awx.awx.controller to ctrliq.ascender.controller, plus associated tests and translation catalog updates.
Changes:
- Add a VMware “Collection” dropdown and persist the selection via the
pluginkey insource_vars. - Update backend inventory injector logic to allow a supported alternate VMware plugin and to choose the corresponding inventory filename.
- Update Ascender controller collection references (docs + tests) and refresh several locale strings.
File summaries
| File | Description |
|---|---|
| docs/docsite/rst/userguide/overview.rst | Updates documented inventory plugin FQCN for Ascender controller collection. |
| awx/ui/src/screens/Inventory/shared/utils.js | Adds VMware plugin parsing/merge helpers and plugin option constants. |
| awx/ui/src/screens/Inventory/shared/utils.test.js | Adds unit tests for VMware plugin parsing/merging behavior. |
| awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.js | Adds “Collection” dropdown to VMware inventory source subform. |
| awx/ui/src/screens/Inventory/shared/InventorySourceSubForms/VMwareSubForm.test.js | Verifies new “Collection” field/options render. |
| awx/ui/src/screens/Inventory/shared/InventorySourceForm.js | Introduces vmware_plugin form value and merges it into source_vars on submit. |
| awx/ui/src/screens/Inventory/shared/Inventory.helptext.js | Adds help text describing the VMware collection/plugin selection. |
| awx/ui/src/screens/Inventory/InventorySourceDetail/InventorySourceDetail.js | Displays the selected VMware collection on the inventory source detail page. |
| awx/ui/src/locales/en/messages.po | Updates English message catalog entries for new/shifted strings. |
| awx/ui/src/locales/es/messages.po | Updates Spanish message catalog entries for new/shifted strings. |
| awx/ui/src/locales/nl/messages.po | Updates Dutch message catalog entries for new/shifted strings. |
| awx/ui/src/locales/zh/messages.po | Updates Chinese message catalog entries for new/shifted strings. |
| awx/main/tests/functional/models/test_inventory.py | Updates Ascender plugin expectation and adds VMware alternate plugin selection coverage. |
| awx/main/tasks/jobs.py | Uses injector-selected filename when writing the inventory plugin file. |
| awx/main/models/inventory.py | Adds alternate-plugin support, filename selection, and updates Ascender/VMware injector behavior. |
Review details
Suppressed comments (1)
awx/main/models/inventory.py:1515
inventory_as_dict()doessource_vars.get('plugin') in self.alternate_pluginsdirectly. Ifpluginis present but not a string (e.g., YAML list/dict), this will raiseTypeErrordue to unhashable membership checks. Capture the value and only compare when it’s a string; otherwise fall through to overriding with the default plugin.
if source_vars.get('plugin') in self.alternate_plugins:
pass # user selected an alternate supported plugin, keep it
elif hasattr(self, 'downstream_namespace') and server_product_name() != 'AWX':
- Files reviewed: 20/29 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
TheWitness
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RH has deprecating the
community.vmware.vmware_vm_inventoryplugin and it was removed in v7 of the collection. We still include an older version of the collection because of our older Ansible version. We also include the newer plugin in our Control Plane EE.https://docs.ansible.com/projects/ansible/latest/collections/community/vmware/vmware_vm_inventory_inventory.html#deprecated
Some users would like to use the new
vmware.vmware.vmsplugin; yet there are still plenty of valid use cases for the old (new ones don't support FREE ESXi). So we should give the user the option to choose what they want to use. We now do this by adding a new dropdown that allows a user to select which collection to use for the VMWare Source Inventory.Also: we fix it to change the awx.awx collection to the new ctrliq.ascender collection, and fix some missed translations while we are at it.